import {Injectable} from '@angular/core';

@Injectable()
export class AuthService {

    constructor() {

    }

    public static getAuthLevel() {
        return localStorage.getItem('hasSubordinate') === 'true';
    }

    public static getAuthorizationHeader(): string {
        const authorization = localStorage.getItem('access_token');
        if (authorization !== null)
            return `bearer ${authorization}`;
        else
            return '';
    }
}
